package com.li.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.li.pojo.po.Notice;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface NoticesMapper extends BaseMapper<Notice> {
    @Select("select * from sys_notice where status = #{status}")
    List<Notice> getPage(String status);

    @Update("update sys_notice set status = 1 where notice_id = #{noticeId}")
    void updateByNoticeId(Integer noticeId);
}
